<template>
  <div> 这是子组件
    {{ value }} -----{{ value2 }}
    <button @click="fn">这是一个加一的按钮</button>
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: Number,
      required: true
    },
    value2: {
      type: Number,
      required: true
    }
  },
  methods: {
    fn() {
      this.$emit('update:value', this.value + 1)
      this.$emit('update:value2', this.value2 + 1)
    }
  }
}
</script>

<style>

</style>
